#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "db.h"
#include "documentaccess.h"

t_documents *
getDocuments(char * filter, int * amount) {
        return getAllDocuments(filter, amount);
}

char *
getDocument(char * title, char * sector, char * level) {
        return getDocumentContent(title, sector, level);
}

int
createDocument(char * title, char * sectorname, char * levelname, char * content, int size) {
        return saveDocument(title, sectorname, levelname, content, size);
}

int
addUserDocumentKey(char * user, char * title, char * key) {
        return saveUserDocumentKey(user, title, key);
}

char *
getUserDocumentKey(char * user, char * title) {
        return getKeyForUserDocument(user, title);
}

int
getSize(char * title) {
        return getDocumentSize(title);
}
